<template>
     <van-nav-bar title="公告详情页" left-arrow @click-left="onClickLeft" />
    <div>
        <el-row :gutter="10" class="row1">
            <el-col :span="24" class="col1">
                <div>标题：{{ message.title }}</div>
            </el-col>
        </el-row>
        <el-row :gutter="10" class="row2">
            <el-col :span="24" class="col1">
                <div><span>发给：</span><span>{{ message.to_user }}</span></div>
            </el-col>
        </el-row>
        <el-row :gutter="10" class="row3">
            <el-col :span="24" class="col1">
                <div v-html="vhtmlstr"></div>
            </el-col>
        </el-row>
    </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import { useMessageStore } from '@/stores/message'
import { useRouter } from 'vue-router'
const router = useRouter()
const onClickLeft = ()=>{
    router.push('/home')
}
const messageStore = useMessageStore()
const message = ref('')
message.value = messageStore.message
console.log(message.value);

const vhtmlstr = ref('')
vhtmlstr.value = message.value.message

</script>

<style lang="scss" scoped>
:deep(.van-nav-bar__content){
    background-color: #D93025;
    height: 100px;
    border-radius: 0 0 45px 45px;
}
:deep(.van-nav-bar__title ){
    font-weight: 900;
    color: #fff;
}
:deep(.van-nav-bar .van-icon){
    color: white;
}
</style>